from app import db


# 创建用户表
class User(db.Model):
    __tablename__ = 'user_info'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    username = db.Column(db.String(40), unique=True)
    password = db.Column(db.String(200), default='')
    mobile = db.Column(db.String(11), default='')
    avater = db.Column(db.String(200), default='')


# 记录表record
class Record(db.Model):
    __tablename__ = 'record'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    username = db.Column(db.String(20))
    recordtime = db.Column(db.DateTime)
    count = db.Column(db.Integer)
